fix(openapi): dataset 改自由字串,解除 GPT 只能查 17 個 dataset 的限制#8
Open
linsamtw wants to merge 1 commit into
Open
Conversation
問題:chatgpt/openapi.yaml 的 queryDataset,dataset 參數寫死成只有 17 個的 enum。ChatGPT 把 enum 當白名單驗證,導致 Custom GPT 實際上只能查這 17 個, 但 FinMind 走 /api/v4/data 的 dataset 有 87 個(datasets.md 共 90,其中 3 個 走專屬 endpoint)。knowledge bundle 已完整列出 90 個含參數/層級,GPT「知道」 卻被 action 擋住。enum 是早期 17 MVP 的殘留,與已擴充到 90 的知識包 drift。 修正:移除 dataset 的 enum,改為自由字串(仍 required),描述指向 knowledge bundle、要求只用 bundle 列出的名稱。87 個 /data dataset 全可查、未來新增 dataset 不需再改 openapi。 註:MCP server 的 query_dataset 工具本來就是自由字串、無此限制,故此修正 僅動 chatgpt/openapi.yaml(GPT-only)。3 個專屬 endpoint dataset 仍未提供 對應 action,本次不在範圍。 驗證:openapi 解析通過(dataset 無 enum、type=string、required)、32 tests passed、build_instructions 7986/8000。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
問題
chatgpt/openapi.yaml的queryDataset,dataset參數寫死成只有 17 個的enum。ChatGPT 把 enum 當白名單驗證 → Custom GPT 實際上只能查這 17 個。但 FinMind 走
/api/v4/data的 dataset 有 87 個(knowledge/datasets.md共 90,其中 3 個走專屬 endpoint)。knowledge bundle 已完整列出 90 個含必填參數/會員層級,GPT「知道」卻被 action 擋住。這個 17-enum 是早期 MVP 的殘留,與已擴充到 90 的知識包 drift。修正
移除
dataset的enum,改為自由字串(仍required),描述指向 knowledge bundle、要求只用 bundle 列出的名稱、不要自行編造。/datadataset 全可查範圍
query_dataset工具本來就是自由字串、無此限制,故此修正僅動chatgpt/openapi.yaml(GPT-only)。驗證
dataset無 enum、type=string、required)32 passed、build_instructions7986/8000套用到 GPT
merge 後,把更新版
chatgpt/openapi.yaml重貼進 GPT Action 的結構描述即可(schema 變更不影響 PyPI / MCP)。🤖 Generated with Claude Code